package LearnDataStructure.a_线性结构.列表.顺序表;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * @version: 1.0
 * @Author: wuqiu
 * @date: 2023-07-01 15:44
 * @description: LeetcodeLearnAlgorithm -> LearnDataStructure.a_线性结构.列表.顺序表
 */
public class MyListLinearTest1 {

    @Test
    public void add() {
        MyListLinear myListLinear = new MyListLinear(5);
        myListLinear.add("xueqiu");
        myListLinear.add("kekeluo");
        myListLinear.add("kailiu");
        myListLinear.add("peikelimu");
        myListLinear.add("xuefei");
        //扩容
        myListLinear.add("xuefei");
        myListLinear.add("xuefei");
        myListLinear.add("xuefei");
        myListLinear.add("xuefei");
        myListLinear.add("xuefei");
        System.out.println(myListLinear);
        myListLinear.Print();
    }

    @Test
    public void delete() {
    }

    @Test
    public void testDelete() {
    }

    @Test
    public void update() {
    }

    @Test
    public void contains() {
    }

    @Test
    public void indexOf() {
        int a = 5;
        int b = 2;
        int c = a / b;
        System.out.println(c);
    }

    @Test
    public void iter() {
        MyListLinear<String> myListLinear = new MyListLinear<String>(5);
        myListLinear.add("xueqiu");
        myListLinear.add("kekeluo");
        myListLinear.add("kailiu");
        myListLinear.add("peikelimu");
        myListLinear.add("xuefei");
        while (myListLinear.hasNext()) {
            System.out.println(myListLinear.next());
        }
    }
}